let switchover=function(handlerSelector, elementSelector, handlerActiveClassName, elementActiveClassName){
    let handler=document.querySelectorAll(handlerSelector);
    let element=document.querySelectorAll(elementSelector);
    let listener=function(event){
        let current=event.target;
        let index=0;
        for(let i=0;i<handler.length;i++){
            if(current==handler[i]){
                index=i;
                break;
            }
        }
        for(let i=0;i<handler.length;i++){
            handler[i].classList.remove(handlerActiveClassName);
            element[i].classList.add(elementActiveClassName);
        }
        handler[index].classList.add(handlerActiveClassName);
        element[index].classList.remove(elementActiveClassName);
    }
    for(let i=0;i<handler.length;i++){
        let h=handler[i];
        h.addEventListener('mouseover', listener, false);
    }
}